<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title> 
    <style> 

    </style>
</head>
<body>
    <input type="text" id="text" />
    <button id='button'>点我</button>
    <script> 
        document.querySelector('#button').addEventListener('click',function(){
            let input = document.querySelector('#text').value
            async function f() { 
             return await new Promise((resolve,reject)=>{ 
                  setTimeout(() => {
                    resolve('fux')
                  }, 1000);
              })
                 
            }
            f().then(v => console.log(v))
        })
         
 
    </script>
</body>
</html>